package org.afs.gescol.edt.api.model;

import java.util.Calendar;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.scub.foundation.framework.core.model.BaseModel;

/**
 * Db Model for Time Slot.
 * @author Kobla GBENYO (kobla.gbenyo@gmail.com)
 */
@Entity
@Table(name = "edt_time_slot")
@AttributeOverrides({@AttributeOverride(name = "id", column = @Column(name = "time_slot_id", nullable = false)),
    @AttributeOverride(name = "version", column = @Column(name = "time_slot_version", nullable = false, unique = false)),
})
public class TimeSlot extends BaseModel {

    /** Serial Version UID. */
    private static final long serialVersionUID = -7429071569400654630L;

    @Column(name = "time_slot_begin_date", nullable = false)
    private Calendar beginDate;

    @Column(name = "time_slot_end_date", nullable = false)
    private Calendar endDate;

    @Column(name = "time_slot_subject_eid", nullable = false)
    private String subjectEid;

    @Column(name = "time_slot_entity_eid", nullable = false)
    private String entityEid;

    @Column(name = "time_slot_leader_eid", nullable = false)
    private String leaderEid;

    /**
     * Get the value of beginDate.
     * @return the beginDate
     */
    public Calendar getBeginDate() {
        return beginDate;
    }

    /**
     * Set the value of beginDate.
     * @param beginDate the beginDate to set
     */
    public void setBeginDate(Calendar beginDate) {
        this.beginDate = beginDate;
    }

    /**
     * Get the value of endDate.
     * @return the endDate
     */
    public Calendar getEndDate() {
        return endDate;
    }

    /**
     * Set the value of endDate.
     * @param endDate the endDate to set
     */
    public void setEndDate(Calendar endDate) {
        this.endDate = endDate;
    }

    /**
     * Get the value of subjectEid.
     * @return the subjectEid
     */
    public String getSubjectEid() {
        return subjectEid;
    }

    /**
     * Set the value of subjectEid.
     * @param subjectEid the subjectEid to set
     */
    public void setSubjectEid(String subjectEid) {
        this.subjectEid = subjectEid;
    }

    /**
     * Get the value of entityEid.
     * @return the entityEid
     */
    public String getEntityEid() {
        return entityEid;
    }

    /**
     * Set the value of entityEid.
     * @param entityEid the entityEid to set
     */
    public void setEntityEid(String entityEid) {
        this.entityEid = entityEid;
    }

    /**
     * Get the value of leaderEid.
     * @return the leaderEid
     */
    public String getLeaderEid() {
        return leaderEid;
    }

    /**
     * Set the value of leaderEid.
     * @param leaderEid the leaderEid to set
     */
    public void setLeaderEid(String leaderEid) {
        this.leaderEid = leaderEid;
    }

    @Override
    public boolean equals(Object other) {
        return equalsUtil(other);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

}
